revXMLFirstChild
Type
function
Summary
Returns the path to a node's first child node.
Syntax
revXMLFirstChild(<treeID>, <parentNode>, [ incText ])
Description
Use the revXMLFirstChild function to begin scanning the child nodes of a parent node.
If the revXMLFirstChild function encounters an error, it returns an error message starting with "xmlerr".
If the incText form is specified and is true the function will return text nodes in processing. Text nodes can be accessed using the revXMLNodeContents function with the extended path format where text only nodes are numerically indexed eg summary/command/[1] is the first text node of the summary/command node.
The incText form is experimental.
The revXMLFirstChild function is part of the XML library. To ensure that the function works in a standalone application, you must include this custom library when you create your standalone. In the Inclusions pane of the Standalone Application Settings window, make sure the "XML" checkbox is checked.
Parameters
Name | Type | Description |
---|---|---|
treeID | The number returned by the revXMLCreateTree or revXMLCreateTreeFromFile function when you created the XML tree. | |
parentNode | The path to the node whose child node you want to find. |
Examples
revXMLFirstChild(1,"/State/City")
put revXMLFirstChild(thisTree,thisNode) into thisNode
Related
library: XML library
control structure: function
function: revXMLNextSibling, revXMLChildNames, revXMLNumberOfChildren, revXMLPreviousSibling, revXMLParent, revXMLRootNode
glossary: LiveCode custom library, Standalone Application Settings, standalone application, return, parent node, child node
keyword: string
Compatibility and Support
Introduced
LiveCode 2.0
OS
mac
windows
linux
ios
android
Platforms
desktop
server
mobile